package cn.net.cfss.fgbp.api.uid.inte;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 全局ID获取接口
 *
 * @author yudeng
 * @since 2019-04-29
 */
@FeignClient(name = "${namespace.feign:}-provider-uid")
@RequestMapping("uid")
public interface IUidService {

    /**
     * 获取整型ID
     *
     * @return
     */
    @RequestMapping(value = "/getUid", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public Long getUid();

    /**
     * 批量获取整型ID
     *
     * @param count 需要的ID个数
     * @return
     */
    @RequestMapping(value = "/getBatchUid/{count}", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    public List<Long> getBatchUid(@PathVariable(value = "count") Integer count);

}
